#include "ISet.h"
#include <vector>


std::unique_ptr<ISet> makeCompactSet(const std::vector<int>& sequence)
{
    std::unique_ptr<ISet> unordered_set(new UnorderedSet(sequence));
    std::unique_ptr<ISet> bit_set(new BitSet(sequence));
    if (unordered_set->byteSize() < bit_set->byteSize()) {
        return std::move(unordered_set);
    } else {
        return std::move(bit_set);
    }
}

